import request from '@/utils/request'

const url = '/BillManagement'
// const url = '/BillNew'

export function getBillDate(query) {
  return request({
    url: url + '/GetBillDataList',
    method: 'get',
    params: query,
  })
}

export function createBillDate(data) {
  return request({
    url: url + '/CreateBillData',
    method: 'post',
    data
  })
}

export function updateBillDate(data) {
  // return request({
  //   url: url + '/UpdateBillData',
  //   method: 'patch',
  //   data
  // })
  return request({
    url: url + '/UpdateBillData',
    method: 'post',
    data
  })
}

export function deleteBillDate(params) {
  // return request({
  //   url: url + '/DeleteBillData',
  //   method: 'delete',
  //   params: params
  // })
  return request({
    url: url + '/DeleteBillData',
    method: 'get',
    params: params
  })
}

export function importBillDate(data) {
  // return request({
  //   url: url + '/ImportBillData',
  //   method: 'put',
  //   data
  // })
  return request({
    url: url + '/ImportBillData',
    method: 'post',
    data
  })
}

export function saveDiscountData(data) {
  // return request({
  //   url: url + '/SaveDiscountData',
  //   method: 'put',
  //   data
  // })
  return request({
    url: url + '/SaveDiscountData',
    method: 'post',
    data
  })
}

export function deleteDiscountDate(params) {
  // return request({
  //   url: url + '/DeleteDiscountDate',
  //   method: 'delete',
  //   params: params
  // })
  return request({
    url: url + '/DeleteDiscountDate',
    method: 'get',
    params: params
  })
}

export function importReconciliationLoanDay(data) {
  // return request({
  //   url: url + '/ImportReconciliationLoanDay',
  //   method: 'put',
  //   data
  // })
  return request({
    url: url + '/ImportReconciliationLoanDay',
    method: 'post',
    data
  })
}

export function getAccuracyData(query) {
  return request({
    url: url + '/GetAccuracyData',
    method: 'get',
    params: query,
  })
}